package com.read.controller;

import com.read.common.response.RespResult;
import com.read.util.RespUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author sh-sunb6
 * @description 主页
 * @date 2019-02-25 9:52
 */
@Api(tags = "首页相关 Controller")
@RestController
@RequestMapping("/index")
public class IndexController {

    private static final Logger logger = LoggerFactory.getLogger(IndexController.class);

    @ApiOperation(value = "检测博阅吧后台服务是否正常", notes = "用于测试")
    @GetMapping("/welcome")
    public RespResult index() {
        logger.info("欢迎访问博阅吧！");
        return RespUtil.success("欢迎访问博阅吧！");
    }
}
